#include <reg52.h>
#include "..\..\commondriver\common_def.h"
#include "..\..\commondriver\serial_driver.h"
#include "..\..\commondriver\graphics_driver.h"
#include "..\..\painter.h"

/*byte idata g_SerialArray[LED_LINE][LED_ROW] =
{    
    //1.LOVE
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
    0x74, 0xff, 0x8f, 0x7a, 0x74, 0xa5, 0x4, 0x20, 
    0x7d, 0xff, 0xb7, 0x7d, 0x7d, 0xb7, 0x7d, 0xaf, 
    0x7d, 0xff, 0xf5, 0xf5, 0xf5, 0xf5, 0x7d, 0xaf, 
    0x7d, 0xff, 0x7d, 0xb7, 0xf5, 0xf5, 0x7d, 0xff, 
    0x7d, 0xff, 0x7d, 0xb7, 0xb7, 0x7d, 0x7d, 0x7d, 
    0x7d, 0xff, 0x7d, 0xb7, 0xb7, 0x7d, 0x5, 0x78, 
    0x7d, 0xff, 0x7d, 0xb7, 0xaf, 0x7e, 0x7d, 0x7d, 
    0x7d, 0xff, 0x7d,0xb7, 0xaf, 0x7e, 0x7d, 0xff, 
    0x7d, 0xb7, 0xf5, 0xf5, 0xcf, 0xfa, 0x7d, 0xaf, 
    0x7d, 0xb7, 0xb7, 0x7d, 0xcf, 0xfa, 0x7d, 0xaf, 
    0x4, 0x30, 0x8f, 0x7a, 0xdf, 0xfb, 0x4, 0x20, 
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
    0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
};*/

byte idata g_SerialArray[LED_LINE][LED_ROW];

void main()
{
    //uchar i;
    uchar CurrentLine = 0;
    //byte DisMem[LED_ROW];

    //23:59:59
    byte numArray[] = 
    {LIB_NUM_2,LIB_NUM_3,LIB_COLON,LIB_NUM_5,LIB_NUM_9,LIB_COLON,LIB_NUM_5,LIB_NUM_9};

   	LED1 = 1;
	LED2 = 1;
	LED3 = 1;

	GDI_Init(&g_SerialArray[0][0], LED_MEM);
    PainterInit(&g_SerialArray[0][0], LED_ROW);

    PainterDrawString(numArray, 8, 0, 0, PM_COPY);
    //PainterDrawCursor(30, 5, 3, PM_COPY);

    GDI_DisFormat();
    while (1)
    {
        GDI_Refresh();
        sleep(1);
    }
}

